/* Team Directories
 *
 * You are free to do whatever you want with this code. Frankly we don't give a damn.
 * 
 *  
 * Copyright GNU General Public License v3
 */


package StudyBuddy;
import java.io.*;
/**
 *
 * @author Gabriel
 * 
 * Runnable Buddy Interface
 * This interface is the most basic interface for Buddies which plan to take 
 * advantage of the features in the Studdy Buddy Buddy Loader Module.
 * 
 * Note that this interface only provides extremely Basic communication
 * between the buddy and the interface. If you wish to take advantage of
 * the Adaptive Engine, for example, use the Runnable Adaptive Buddy interface.
 * 
 */
public interface RunnableBuddy extends Runnable{
    
    public String getName();
    /* This function will be called by the PluginCollection Class and
     * will set the Name of the Buddy. For example, if you decide to 
     * call your buddy a "MACM BUDDY" getname should return 
     * "MACM BUDDY"
     */
    
    public int getScore();
    /* Gets the current score of the Buddy. Note that the scores will be
     * updated live (ever 10ms) in the Statistics and Adaptive class - 
     * so make sure that this is taken into account when implementing
     * getScore.
     */
    
    public void setLoginInfo(String username);
    /* The setLoginInfo class simply sets the name of the User who is
     * currently logged in. You can use this method to display the 
     * username of the current user, or you can implement more sophisticated
     * ways of using this.
     *
     * IMPORTANT NOTE
     * Note that this method "PUSHES" the information to the Buddy once and
     * only once for each user, specifically it is called right before run()
     * Note that it is NOT set when the class is first loaded into memory
     * This is to allow for mutiple user accounts.
     * 
     * When using setLoginInfo make sure that you are ready for a new user
     * each time "run" is being called.
     */
     
    public Serializable getSavedGame();
    /* This function returns the same game of type Serializable, for writing
     * into a file. The Serializable object is then passed into the PluginLoader
     * (that's what this is) to be saved. Therefore the plugin architecture handles
     * all the saving and loading of a game
     * The saved game format should
     */
    
    public void loadSavedGame(Serializable savegame);
    /* This method loads a saved game from the interface - this will be called
     * at some point BEFORE run() is called, therefore giving the program oppurtunity
     * to load all the relevant details stored in the method. */

}